package object;

public class Main {
	import java.util.ArrayList;
	import java.util.Scanner;

	public class Main {
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			while (sc.hasNext()) 
			{
				int n = sc.nextInt();
				Object[] one = new Object[n];
				for (int j = 0; j < one.length; j++) 
				{
					String s = sc.next();
					if (s.equals("c")) 
					{
						one[j] = new Computer();
					} 
					else if (s.equals("d")) 
					{
						double a = sc.nextDouble();
						one[j] = new Double(a);
					} 
					else if (s.equals("i")) 
					{
						int a = sc.nextInt();
						one[j] = new Integer(a);
					} 
					else if (s.equals("s")) 
					{
						String a = sc.next();
						one[j] = new String(a);
					}
					else 
					{
						one[j]=null;
					}
				}
				for(int j=one.length-1;j>=0;j--)
				{
					if(one[j]!=null)
					System.out.println(one[j]);
				}
			}
			sc.close();
		}
	}

}
